﻿@model ConsultationIM
@{
    ViewBag.Title = "申报咨询";
    Layout = "~/Views/Shared/_AffirmationLayout.cshtml";
 
}

<div class="content">
    <header class="page-title">
        <h1 class="text-center">申报咨询</h1>
    </header>
    <section class="p15">
        <div class="alert alert-info">注：带*号为必填项。填写完毕后，请点击确认，本公司将派专员与您联系。</div>
    </section>
    @using (Ajax.BeginForm("SendEmail", null, new AjaxOptions
    {

        HttpMethod = "POST",
        OnBegin = "onBeginSave",
        OnComplete = "onCompleteSave",
        OnSuccess = "updateSuccess"

    }, new { @class = "pure-form pure-form-stacked", novalidate = "novalidate", role = "form" }))
    {

        @Html.AntiForgeryToken()
        @*@Html.ValidationSummary(false)*@



        <div class="row" id="consultation">
            <div class="col-sm-12">
                @Html.LabelFor(model => model.CompanyName)
                @Html.TextBoxFor(model => model.CompanyName, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.CompanyName)
            </div>
            <div class="col-sm-12">
                @Html.LabelFor(model => model.CompanyIntro)
                @Html.TextAreaFor(model => model.CompanyIntro, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.CompanyIntro)
            </div>
            <div class="col-sm-4">
                @Html.LabelFor(model => model.ContactMan)
                @Html.TextBoxFor(model => model.ContactMan, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.ContactMan)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.Phone)
                @Html.TextBoxFor(model => model.Phone, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Phone)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.Mobile)
                @Html.TextBoxFor(model => model.Mobile, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Mobile)
            </div>
            <div class="col-sm-4">
                @Html.LabelFor(model => model.OICQ)
                @Html.TextBoxFor(model => model.OICQ, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.OICQ)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.Email)
                @Html.TextBoxFor(model => model.Email, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Email)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.Homepage)
                @Html.TextBoxFor(model => model.Homepage, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Homepage)
            </div>
            <div class="col-sm-12">
                <h3>主营产品（服务）所属技术领域</h3>
            </div>
            <div class="col-sm-4">

                @*@Html.CheckBoxListFor(x => x.Areas, x => x.AvailableAreas)*@

                <label for="area1" class="pure-checkbox">
                    <input id="area1" name="Areas" type="checkbox" value="电子信息技术"> 电子信息技术
                </label>
            </div>
            <div class="col-sm-4">
                <label for="area2" class="pure-checkbox">
                    <input id="area2" name="Areas" type="checkbox" value="生物与新医药技术"> 生物与新医药技术
                </label>
            </div>
            <div class="col-sm-4">
                <label for="area3" class="pure-checkbox">
                    <input id="area3" name="Areas" type="checkbox" value="航空航天技术"> 航空航天技术
                </label>
            </div>
            <div class="col-sm-4">
                <label for="area4" class="pure-checkbox">
                    <input id="area4" name="Areas" type="checkbox" value="新材料技术"> 新材料技术
                </label>
            </div>
            <div class="col-sm-4">
                <label for="area5" class="pure-checkbox">
                    <input id="area5" name="Areas" type="checkbox" value="新能源及节能技术"> 新能源及节能技术
                </label>
            </div>
            <div class="col-sm-4">
                <label for="area6" class="pure-checkbox">
                    <input id="area6" name="Areas" type="checkbox" value="资源与环境技术"> 资源与环境技术
                </label>
            </div>
            <div class="col-sm-4">
                <label for="area7" class="pure-checkbox">
                    <input id="area7" name="Areas" type="checkbox" value="高新技术改造传统产业"> 高新技术改造传统产业
                </label>
            </div>
            <div class="col-sm-4">
                <label for="area8" class="pure-checkbox">
                    <input id="area8" name="Areas" type="checkbox" value="其他领域"> 其他领域
                </label>
            </div>
            <div class="col-sm-12">
                <h3>
                    近3年内获得的自主知识产权数(件)
                </h3>
            </div>
            <div class="col-sm-4">
                @Html.LabelFor(model => model.Patent)
                @Html.TextBoxFor(model => model.Patent, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Patent)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.Newtype)
                @Html.TextBoxFor(model => model.Newtype, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Newtype)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.Design)
                @Html.TextBoxFor(model => model.Design, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Design)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.Software)
                @Html.TextBoxFor(model => model.Software, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Software)
            </div>

            <div class="col-sm-8">
                @Html.LabelFor(model => model.Integrate)
                @Html.TextBoxFor(model => model.Integrate, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Integrate)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.Plant)
                @Html.TextBoxFor(model => model.Plant, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Plant)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.Orther)
                @Html.TextBoxFor(model => model.Orther, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Orther)
            </div>

            <div class="col-sm-12">
                <h3>
                    人力资源情况
                </h3>
            </div>
            <div class="col-sm-6">
                @Html.LabelFor(model => model.WorkerCount)
                @Html.TextBoxFor(model => model.WorkerCount, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.WorkerCount)
            </div>

            <div class="col-sm-6">
                @Html.LabelFor(model => model.BrainpowerCount)
                @Html.TextBoxFor(model => model.BrainpowerCount, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.BrainpowerCount)
            </div>

            <div class="col-sm-6">
                @Html.LabelFor(model => model.DeveloperCount)
                @Html.TextBoxFor(model => model.DeveloperCount, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.DeveloperCount)
            </div>
            <div class="col-sm-6">
                @Html.LabelFor(model => model.OverseasCount)
                @Html.TextBoxFor(model => model.OverseasCount, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.OverseasCount)
            </div>

            <div class="col-sm-12">
                <h3>
                    近3年每年销售收入（万元）

                </h3>
            </div>


            <div class="col-sm-4">
                @Html.LabelFor(model => model.SaleOne)
                @Html.TextBoxFor(model => model.SaleOne, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.SaleOne)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.SaleTwo)
                @Html.TextBoxFor(model => model.SaleTwo, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.SaleTwo)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.SaleThree)
                @Html.TextBoxFor(model => model.SaleThree, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.SaleThree)
            </div>

            <div class="col-sm-12">
                <h3>
                    近3年每年总资产（万元）
                </h3>
            </div>


            <div class="col-sm-4">
                @Html.LabelFor(model => model.AssetsOne)
                @Html.TextBoxFor(model => model.AssetsOne, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.AssetsOne)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.AssetsTwo)
                @Html.TextBoxFor(model => model.AssetsTwo, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.AssetsTwo)
            </div>

            <div class="col-sm-4">
                @Html.LabelFor(model => model.AssetsThree)
                @Html.TextBoxFor(model => model.AssetsThree, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.AssetsThree)
            </div>


            <div class="col-sm-12">
                <p class="noleftpadding">
                    <button type="submit" id="btnSave" class="btn btn-primary btn-block">提交表单</button>
                </p>
            </div>

        </div>
    }




</div>

@section header{
<link href="~/plugins/toastr/toastr.min.css" rel="stylesheet" />
    <style>
        .form-control{
            width:100%; margin-bottom:15px;
        }
    </style>
    }


@section footer{

    @Scripts.Render("~/bundles/jqueryvalWithBootstrap")
    <script src="~/plugins/toastr/toastr.min.js"></script>
    <script>

    function onBeginSave() {
        $("#btnSave").text("发送中...");
    }
    function onCompleteSave() {
        $("#btnSave").text("马上发送");
    }

    function updateSuccess(data) {
        var title = '@ViewBag.Title';
      //  Common.ShowBox(data.Status, data.Message, title);

        switch (data.Status) {
            case 1:
                toastr.success(data.Message, title)
                break;
            case 2:
                toastr.error(data.Message, title)
                break;
            case 3:
                toastr.info(data.Message, title)
                break;
            case 4:
                toastr.warning(data.Message, title)
        }
    }

    </script>


}